<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
	.errorLabel {
		border-color: red;
		color: red;
	}
	.required {
		font-weight: bold;
	}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title><s:text name="welcome.title" /></title>
</head>
<body>
	<p>
		<s:text name="categorycreator.title" />
	</p>
	<s:form action="CategoryCreator_forward">
		<p>
			<s:textfield name="categoryname" key="categorycreator.categoryname" required="true" size="20" />
			<s:submit method="execute" key="button.create" />			
			<s:hidden name="categoryDataPosted" value="true" />
		</p>
	</s:form>
	
	<s:a action="CategoryCreator_backwards"><s:text name="button.back" /></s:a>
	
	<font color="red">
		<s:actionerror label="label" />
	</font>
	
	<p>
		<b><s:text name="categorycreator.categories" />:</b><br />
		<table width="50%" border="0" cellpadding="5">
			<s:iterator value="categoryList" status="rowstatus">
				<s:if test="#rowstatus.odd == true">
						<tr bgcolor="#CCCCCC">
					<s:else>
						<tr>
					</s:else>
				</s:if>
					<td width="80%">
						<s:property value="name" />
					</td>
					<td align="center">
						<s:form action="CategoryDelete" theme="simple">
							<s:submit  key="button.delete" />
							<s:hidden name="categoryId" value="%{categoryId}" />
						</s:form>
					</td>
				</tr>
			</s:iterator>
		</table>
	</p>
</body>
</html>